package com.yjz.springcloudconsumer01.controller;

import com.yjz.springcloudconsumer01.remote.HelloRemoteInterface;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Desc
 * @Author: jinzhong.yuan
 * @Date: 2019/2/15 15:45
 */
@RestController
public class ConsumerController {
    @Autowired
    private HelloRemoteInterface helloRemote;

    @RequestMapping("/hello/{name}")
    public String index(@PathVariable("name") String name) {
        return helloRemote.hello(name);
    }

}
